/*
 * @Author: 13177709051 3506463075@qq.com
 * @Date: 2024-11-01 22:02:18
 * @LastEditors: 13177709051 3506463075@qq.com
 * @LastEditTime: 2024-11-05 16:13:16
 * @FilePath: /linux30/ThreadPool/Task.hpp
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#pragma once

#include <iostream>
#include <functional>

class Task
{
public:
    Task()
    {}
    Task(int x, int y) :_x(x), _y(y)
    {}
    void Excute()
    {
        _result = _x + _y;
    }
    void operator()()
    {
        Excute();
    }
    std::string debug()
    {
        std::string msg = std::to_string(_x) + "x" + std::to_string(_y) + "= ?";
        return msg;
    }
    std::string result()
    {
        std::string msg = std::to_string(_x) + "x" + std::to_string(_y) + "=" + std::to_string(_result); 
        return msg;
    }
private:
    int _x;
    int _y;
    int _result;
};